package com.L1ngg;

import java.util.Scanner;

public class text06 {
	public static void main(String[] args) {
		int num;
		double result;
		
		Scanner reader = new Scanner(System.in);
		num = reader.nextInt();
		
		result = add(num);
		System.out.println("加和的结果是: "+result);
	}
	public static double add(int n) {
		int flag = 1;
		double sum = 0;
		int i;
		
		for(i=1;i<=n;i++) {
			sum += 1.0/i*flag;
			flag = -flag;
		}
		
		return sum;
	}
}
